export interface choisesType {
  name: string;
  id: string;
}
export interface choisesTwoType {
  groupType: string;
  name: string;
  id: string;
}
//条件搜索类型
export interface dataType {
  choises: choisesType[] | choisesTwoType[];
  formType: string;
  label: string;
  name: string;
  style: string;
  valueType: string;
}
export type dataListType = dataType[];
//主题列表

export interface ContentType {
  cover: string;
  id: string;
  name: string;
  onsellTime: number;
  remark: string;
  updateTime: number;
  webUrl: string;
}
export interface ContentListType {
  content: ContentType[];
  number: number;
  numberOfElements: number;
  size: string;
  sort: null;
  statistics: null;
  totalElements: number;
  totalPages: number;
  useOffset: boolean;
}
//视频列表类型import type {DataType}  from './type/resourceType'

 export interface ApifoxModel {
    code: number;
    data: Data;
}

export interface Data {
    content: DataContent;
    number: number;
    numberOfElements: number;
    size: string;
    sort: null;
    statistics: null;
    totalElements: number;
    totalPages: number;
    useOffset: boolean;
}

export interface DataContent {
    content: ContentElement[];
    first: boolean;
    last: boolean;
    number: number;
    numberOfElements: number;
    offset: null;
    size: number;
    sort: null;
    statistics: Statistics;
    totalElements: number;
    totalPages: number;
    useOffset: boolean;
}

export interface ContentElement {
    activityTotalDays: number;
    aiyigeApplication: string;
    algorithmSortValue: number;
    avocationTags: AvocationTag[];
    channel: string;
    cityId: string;
    cityName: string;
    commodityBackup: CommodityBackup;
    cover: string[];
    createTime: number;
    creator: string;
    creatorBackup: CreatorBackup;
    difficultDegreeValue: number;
    editHighestVersion: string;
    enclosureCount: number;
    favorableValue: number | number;
    id: string;
    initExposureNum: number;
    inventoryBackup: InventoryBackup;
    maxP: number;
    mediaSummary: MediaSummary;
    momentClassificationBackup: MomentClassificationBackup;
    momentId: string;
    moreBackup: MoreBackup;
    needPromotion: number;
    notVipPromotion: number;
    num: number;
    onsellTime: number;
    onsellUpdateTime: number;
    otherTags: OtherTag[];
    popTrainingIndex: number | number;
    priorityDisplay: number;
    priorityDisplayTime: number;
    promotionState: number;
    recDegree: number;
    receiptsAmountCapacity: number;
    recentFavorableValue: number | number;
    router: string;
    shelfTime: number;
    statisticsBackup: StatisticsBackup;
    status: string;
    subject: string;
    tags: Tag[];
    title: string;
    updateTime: number;
    version: number;
    vipPromotion: number;
    vipTag: VipTag;
}

export interface AvocationTag {
    id: string;
    label: string;
    name: string;
}

export interface CommodityBackup {
    originPrice: string;
    price: string;
    showLinePrice: boolean;
    unitPrice: string;
}

export interface CreatorBackup {
    avatar: string;
    certificationType: string;
    id: string;
    level: number;
    name: string;
    type: string;
    vipExpireTime: number;
    vipGrade: number;
}

export interface InventoryBackup {
    availableInventory: number;
    lockedInventory: number;
    orderOccupiedInventory: number;
    selledInventory: number;
    total: number;
    virtualInventory: number;
}

export interface MediaSummary {
    count: number;
    duration: number;
}

export interface MomentClassificationBackup {
    classification?: string;
    originalStatement?: number;
    workTitle: string;
}

export interface MoreBackup {
    actualPrice: string;
    allowExtractAudio: number;
    applePriceId: string;
    courseTypeTags: CourseTypeTag[];
    difficultDegree: DifficultDegree;
    divisionModel?: string;
    divisionProportion: string;
    iosDivisionProportion: string;
    learningGoalsTags: LearningGoalsTag[];
    originPrice: string;
    otherDivisionProportion: string;
    platformVipPlan: number;
    price: string;
    suitablePopulationTags: SuitablePopulationTag[];
    teacher: string;
    totalDuration: number;
    videoCount: number;
    videos: Video[];
}

export interface CourseTypeTag {
    groupType: string;
    id: string;
    label: string;
    name: string;
}

export interface DifficultDegree {
    id: number | string;
    name: string;
}

export interface LearningGoalsTag {
    groupType: string;
    id: string;
    label: string;
    name: string;
}

export interface SuitablePopulationTag {
    groupType: string;
    id: string;
    label: string;
    name: string;
}

export interface Video {
    audioExtracted: boolean;
    buyed: boolean;
    canPreview: boolean;
    cover: string;
    duration: number;
    free: number;
    hlsUrl: string;
    index: number;
    itemType: number;
    originUrl: string;
    originVideoMd5: string;
    persistentId: string;
    selected: boolean;
    size: number;
    sortNum: number;
    title: string;
    url: string;
}

export interface OtherTag {
    groupType: string;
    id: string;
}

export interface StatisticsBackup {
    actualSellCount: number;
    commentCount: number;
    enquiryCount: number;
    exposureCount: number;
    favoriteCount: number;
    liveStatus: number;
    lockCount: number;
    playBackDuration: number;
    praiseCount: number;
    requireAccessoryCount: number;
    requireLiveCourseCount: number;
    requireMajorCourseCount: number;
    requireMusicCount: number;
    requireVideoCourseCount: number;
    reviewCount: number;
    sellAmount: number | string;
    sellCount: number;
    shareAmount: number | string;
    shareCount: number;
    signupCount: number;
    studentCount: number;
    userCacheCount: number;
    viewCount: number;
}

export interface Tag {
    groupType: string;
    id: string;
    name: string;
}

export interface VipTag {
    createTime: number;
    groupType: string;
    priority: number;
    updateTime: number;
}

export interface Statistics {
    minScore: null;
    searchSuggest: null;
    totalDiscountCourse: number;
    totalVipPrivilegeCount: number;
}
//获取视频列表数据类型
export interface filterInfoType {
    filterCode: string;
    filterValue: string[];
  }
export type filterInfoListType=filterInfoType[]
import request from '@/utils/request';
//动态搜索条件列表/moment/properties/filter/vip_zone
export const reqClassDataList = () => {
  return request.get<null, dataListType>(`/moment/properties/filter/vip_zone`);
};
//获取主题列表/moment/activityZones/collect/default  pageSize

export const reqTopicList = (pageSize: number) => {
  return request.get<null, ContentListType>(
    `/moment/activityZones/collect/default?pageSize=${pageSize}`
  );
};
// 获取视频列表、http://zsjyyds.online:9000/apis/moment/moments/collect/vip_zone/integrated?pageSize=20&pageNum=0
export const reqVideoList=(pageSize:number,pageNum:number)=>{
    return request.get<null,Data>(`/moment/moments/collect/vip_zone/integrated?pageSize=${pageSize}&pageNum=${pageNum}`)
}
